home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / IBPalettes / WWTCLKit / WWMatrixAdditions.m < prev    next >
Encoding:
Text File  |  1995-03-22  |  1.4 KB  |  55 lines

  1. #import "WWMatrixAdditions.h"
  2.  
  3. @implementation Matrix(WWMatrixAdditions)
  4.  
  5. // this is somewhat dangerous, as I'm only going by what the NeXT doc
  6. // says the normal Matrix class does here.  If they do something
  7. // undocumented, well, I'm screwed, because I can't get at Matrix's
  8. // original implementation of this method.  Unfortunately, since
  9. // the IBEditor stuff that goes with Matrix is undocumented, I lose
  10. // all sorts of nifty abilities if I subclass, and I don't want to have
  11. // to do all the work of Ranker...  sigh....  
  12.  
  13. // define this so that we don't get complaints, but don't have to include other stuff...
  14. - updateInterp { return self; }
  15.  
  16. - sendAction:(SEL)theAction to:theTarget
  17. {
  18.   if ([[self selectedCell] respondsTo:@selector(updateInterp)])
  19.   {  [[self selectedCell] updateInterp];
  20.   }
  21.   if (theAction && theTarget)
  22.   {  return [super sendAction:theAction to:theTarget];
  23.   }
  24.   if (!theAction)
  25.   {  if (!theTarget)
  26.      {  return [super sendAction:[self action] to:[self target]];
  27.      } 
  28.      else
  29.      {  return [super sendAction:[self action] to:theTarget];
  30.      }
  31.   }
  32.   if (!theTarget)
  33.   {  return [super sendAction:theAction to:[self target]];
  34.   }
  35.   return nil;
  36. }
  37.  
  38. - changeFont:sender
  39. {
  40.   [[self selectedCell] setFont:[sender convertFont:[cell font]]];
  41.   return self;
  42. }
  43.  
  44. - changeIBFont:sender
  45. {
  46.   [cell setFont:[sender convertFont:[cell font]]];
  47.   if ([cell respondsTo:@selector(updateInterp)])
  48.   {  [cell updateInterp];
  49.   }
  50.   return self;
  51. }
  52.  
  53.  
  54. @end
  55.